widget: Free the controller list on finalize()
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 14 Jan 2015 15:59:36 +0000 (16:59 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 14 Jan 2015 16:11:25 +0000 (17:11 +0100)
commitb8e87d47626afd7d6271425a5772f2ee774d1b78
treeb36a66379e2af88266a09b5aa826a36544906cb3
parent594de00cad7c5e588bc3f44d1cbfce583408b0b1
widget: Free the controller list on finalize()

If this is done on dispose(), the widget may be destroyed (and its
controllers list NULLified) within _gtk_widget_run_controllers(),
causing warnings/crashes when it just tried to hop on the next
controllers.

Freeing the controllers here should be a safety net for implementations,
so it also makes sense to do this late. The widgets that choose to
free their controllers on dispose can still do so, and get
_gtk_widget_remove_controller() called for these as an indirect result.
gtk/gtkwidget.c